package com.property.demo.repository;

import com.property.demo.model.Parking;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ParkingRepository extends JpaRepository<Parking, Long>, JpaSpecificationExecutor<Parking> {
    
    List<Parking> findByCommunityId(Long communityId);
    
    List<Parking> findByNameContaining(String name);
    
    List<Parking> findByNameContainingAndCommunityId(String name, Long communityId);
    
    List<Parking> findByStatus(String status);
} 